<?php

declare(strict_types=1);

namespace app\common\model;

use Dengje\Pxy\BaseModel;

class ScienceCategoryModel extends BaseModel
{
    protected $name = 'science_category';
    
    /**
     * 关联文章模型
     * @return \think\model\relation\HasMany
     */
    public function articles()
    {
        return $this->hasMany(ScienceModel::class, 'category_id', 'id');
    }
}